x86/p2m: add option to skip root pagetable removal in p2m_teardown()
authorRoger Pau Monné <roger.pau@citrix.com>
Tue, 11 Oct 2022 12:21:23 +0000 (14:21 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 11 Oct 2022 12:21:23 +0000 (14:21 +0200)
commit1df52a270225527ae27bfa2fc40347bf93b78357
treed19631b13bb4052d1dc071bf1824d05158baa27a
parent3202084566bba0ef0c45caf8c24302f83d92f9c8
x86/p2m: add option to skip root pagetable removal in p2m_teardown()

Add a new parameter to p2m_teardown() in order to select whether the
root page table should also be freed.  Note that all users are
adjusted to pass the parameter to remove the root page tables, so
behavior is not modified.

No functional change intended.

This is part of CVE-2022-33746 / XSA-410.

Suggested-by: Julien Grall <julien@xen.org>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/x86/include/asm/p2m.h
xen/arch/x86/mm/hap/hap.c
xen/arch/x86/mm/p2m-basic.c
xen/arch/x86/mm/shadow/common.c